Index | Conventions

api/v1/pos/{pono}/comments

Path: api/v1/pos/{pono}/comments

This API is JSON:API compliant.

This endpoint supports the following methods:
GET POST PATCH

This endpoint requires an OAuth bearer token, and returns errors in a standard shape. See API Conventions for authentication, error responses and paging, which apply to every endpoint.

The resource type for this endpoint is PurchaseComment
The identifier is pono-lineid

Attributes

The PurchaseComment resource type attributes are as follows:

AttributeTypeRead-onlyDescription
commentstringThe comment text.
includeboolean
modifyDatestring✓The modification date and time of the comment in ISO date time format. Timezone is the timezone of the Jim2 server.
modifyInitstring✓The initials of the user who last modified the comment.
statusstring✓The status the parent object was in when the comment was added.

Example GET (Return all)

Path: api/v1/pos/10/comments

Response:

This example shows the maximum set of fields the endpoint can return, all populated. A real response only contains the data that applies to that record, so fields that are empty or not relevant are omitted — do not assume every field shown here will be present in every response.

This is a list. To keep the example readable, only the first item below is written out; the later items have been trimmed down in this documentation. In a real response each item comes back with the data applicable to that record (as described above).

Side-loading related resources with the include query parameter is not supported on list endpoints: an include parameter is ignored here and no included section is returned. To retrieve a related resource, request it directly using the id shown in each item's relationships, or use the single-resource (get by id) endpoint, which does support include.

{
    "data": [
        {
            "id": "10-1",
            "type": "PurchaseComment",
            "attributes": {
                "include": true,
                "status": "Booked",
                "comment": "Purchase order raised from contract requirement.",
                "modifyInit": "SYS",
                "modifyDate": "2024-03-25T17:07:23+11:00"
            }
        },
        {
            "id": "10-2",
            "type": "PurchaseComment",
            "attributes": {
                "status": "FINISH",
                "comment": "Unprinted"
            }
        }
    ]
}

Example GET (Return specific)

Path: api/v1/pos/10/comments/10-1

Response:

This example shows the maximum set of fields the endpoint can return, all populated. A real response only contains the data that applies to that record, so fields that are empty or not relevant are omitted — do not assume every field shown here will be present in every response.

{
    "data": {
        "id": "10-1",
        "type": "PurchaseComment",
        "attributes": {
            "include": true,
            "status": "Booked",
            "comment": "Purchase order raised from contract requirement.",
            "modifyInit": "SYS",
            "modifyDate": "2024-03-20T10:59:42+11:00"
        },
      "links": {
        "self": "/api/v1/pos/10/comments/10-1"
      }
    }
}

Example POST

Path: api/v1/pos/10/comments

Request:

{
    "data": {
        "type": "PurchaseComment",
        "attributes": {
            "include": false,
            "comment": "Add new comment"
        }
    }
}

Response:

This example shows the maximum set of fields the endpoint can return, all populated. A real response only contains the data that applies to that record, so fields that are empty or not relevant are omitted — do not assume every field shown here will be present in every response.

{
    "data": {
        "id": "10-3",
        "type": "PurchaseComment",
        "attributes": {
            "include": true,
            "status": "Booked",
            "comment": "Add new comment",
            "modifyInit": "API",
            "modifyDate": "2025-03-27T12:39:29+11:00"
        },
      "links": {
        "self": "/api/v1/pos/10/comments/10-3"
      }
    }
}

Example PATCH

Path: api/v1/pos/10/comments/10-1

Request:

{
    "data": {
        "id": "10-1",
        "type": "PurchaseComment",
        "attributes": {
            "include": true,
            "comment": "Test 2"
        }
    }
}

Response:

This example shows the maximum set of fields the endpoint can return, all populated. A real response only contains the data that applies to that record, so fields that are empty or not relevant are omitted — do not assume every field shown here will be present in every response.

{
	"data": {
		"id": "10-1",
		"type": "PurchaseComment",
		"attributes": {
			"include": true,
			"status": "FINISH",
			"comment": "Test 2",
			"modifyInit": "API",
			"modifyDate": "2021-03-10T11:33:53"
		},
		"links": {
			"self": "/api/v1/pos/10/comments/10-1"
		}
	}
}